package com.main.hotel.repository;

import com.main.hotel.entity.Bill;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Query;
import org.springframework.stereotype.Repository;

/**
 * @author 莫浚洋
 */

@Repository
public interface BillRepository extends JpaRepository<Bill, Integer>,
        JpaSpecificationExecutor<Bill> {
    @Query(value = "select sum(cost) from bill", nativeQuery = true)
    public Long findTotalCost();


}
